<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Relational operators</title>
<link rel="stylesheet" href="../../../../../../../doc/src/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
<link rel="home" href="../../../index.html" title="Chapter 1. Fusion 2.2">
<link rel="up" href="../class_template_tuple.html" title="Class template tuple">
<link rel="prev" href="element_access.html" title="Element access">
<link rel="next" href="../pairs.html" title="Pairs">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../boost.png"></td>
<td align="center"><a href="../../../../../../../index.html">Home</a></td>
<td align="center"><a href="../../../../../../../libs/libraries.htm">Libraries</a></td>
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
<td align="center"><a href="../../../../../../../more/index.htm">More</a></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="element_access.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../class_template_tuple.html"><img src="../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="../pairs.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
<div class="section">
<div class="titlepage"><div><div><h4 class="title">
<a name="fusion.tuple.class_template_tuple.relational_operators"></a><a class="link" href="relational_operators.html" title="Relational operators">Relational
        operators</a>
</h4></div></div></div>
<h6>
<a name="fusion.tuple.class_template_tuple.relational_operators.h0"></a>
          <span class="phrase"><a name="fusion.tuple.class_template_tuple.relational_operators.description"></a></span><a class="link" href="relational_operators.html#fusion.tuple.class_template_tuple.relational_operators.description">Description</a>
        </h6>
<p>
          The <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2002/n1403.pdf" target="_top">TR1
          Tuple</a> provides the standard boolean relational operators.
        </p>
<h6>
<a name="fusion.tuple.class_template_tuple.relational_operators.h1"></a>
          <span class="phrase"><a name="fusion.tuple.class_template_tuple.relational_operators.specification"></a></span><a class="link" href="relational_operators.html#fusion.tuple.class_template_tuple.relational_operators.specification">Specification</a>
        </h6>
<div class="variablelist">
<p class="title"><b>Notation</b></p>
<dl class="variablelist">
<dt><span class="term"><code class="computeroutput"><span class="identifier">T1</span> <span class="special">...</span>
            <span class="identifier">TN</span></code>, <code class="computeroutput"><span class="identifier">U1</span>
            <span class="special">...</span> <span class="identifier">UN</span></code></span></dt>
<dd><p>
                Tuple element types
              </p></dd>
<dt><span class="term"><code class="computeroutput"><span class="identifier">P1</span> <span class="special">...</span>
            <span class="identifier">PN</span></code></span></dt>
<dd><p>
                Parameter types
              </p></dd>
<dt><span class="term"><code class="computeroutput"><span class="identifier">Ti</span></code>, <code class="computeroutput"><span class="identifier">Ui</span></code></span></dt>
<dd><p>
                The type of the <code class="computeroutput"><span class="identifier">i</span></code>th
                element of a tuple
              </p></dd>
<dt><span class="term"><code class="computeroutput"><span class="identifier">Pi</span></code></span></dt>
<dd><p>
                The type of the <code class="computeroutput"><span class="identifier">i</span></code>th
                parameter
              </p></dd>
</dl>
</div>
<pre class="programlisting"><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">T1</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">T2</span><span class="special">,</span> <span class="special">...,</span> <span class="keyword">typename</span> <span class="identifier">TN</span><span class="special">,</span>
         <span class="keyword">typename</span> <span class="identifier">U1</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">U2</span><span class="special">,</span> <span class="special">...,</span> <span class="keyword">typename</span> <span class="identifier">UN</span><span class="special">&gt;</span>
<span class="keyword">bool</span> <span class="keyword">operator</span><span class="special">==(</span>
    <span class="keyword">const</span> <span class="identifier">tuple</span><span class="special">&lt;</span><span class="identifier">T1</span><span class="special">,</span> <span class="identifier">T2</span><span class="special">,</span> <span class="special">...,</span> <span class="identifier">TN</span><span class="special">&gt;&amp;</span> <span class="identifier">lhs</span><span class="special">,</span>
    <span class="keyword">const</span> <span class="identifier">tuple</span><span class="special">&lt;</span><span class="identifier">U1</span><span class="special">,</span> <span class="identifier">U2</span><span class="special">,</span> <span class="special">...,</span> <span class="identifier">UN</span><span class="special">&gt;&amp;</span> <span class="identifier">rhs</span><span class="special">);</span>
</pre>
<p>
          <span class="bold"><strong>Requirements</strong></span>: For all <code class="computeroutput"><span class="identifier">i</span></code>,
          <code class="computeroutput"><span class="number">1</span> <span class="special">&lt;=</span>
          <span class="identifier">i</span> <span class="special">&lt;</span>
          <span class="identifier">N</span></code>, <code class="computeroutput"><a class="link" href="element_access.html" title="Element access"><code class="computeroutput"><span class="identifier">get</span></code></a><span class="special">&lt;</span><span class="identifier">i</span><span class="special">&gt;(</span><span class="identifier">lhs</span><span class="special">)</span> <span class="special">==</span> <a class="link" href="element_access.html" title="Element access"><code class="computeroutput"><span class="identifier">get</span></code></a><span class="special">&lt;</span><span class="identifier">i</span><span class="special">&gt;(</span><span class="identifier">rhs</span><span class="special">)</span></code>
          is a valid expression returning a type that is convertible to <code class="computeroutput"><span class="keyword">bool</span></code>.
        </p>
<p>
          <span class="bold"><strong>Semantics</strong></span>: Returns <code class="computeroutput"><span class="keyword">true</span></code>
          if and only if <code class="computeroutput"><a class="link" href="element_access.html" title="Element access"><code class="computeroutput"><span class="identifier">get</span></code></a><span class="special">&lt;</span><span class="identifier">i</span><span class="special">&gt;(</span><span class="identifier">lhs</span><span class="special">)</span> <span class="special">==</span> <a class="link" href="element_access.html" title="Element access"><code class="computeroutput"><span class="identifier">get</span></code></a><span class="special">&lt;</span><span class="identifier">i</span><span class="special">&gt;(</span><span class="identifier">rhs</span><span class="special">)</span></code>
          for all <code class="computeroutput"><span class="identifier">i</span></code>. For any 2 zero
          length tuples <code class="computeroutput"><span class="identifier">e</span></code> and <code class="computeroutput"><span class="identifier">f</span></code>, <code class="computeroutput"><span class="identifier">e</span>
          <span class="special">==</span> <span class="identifier">f</span></code>
          returns <code class="computeroutput"><span class="keyword">true</span></code>.
        </p>
<pre class="programlisting"><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">T1</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">T2</span><span class="special">,</span> <span class="special">...,</span> <span class="keyword">typename</span> <span class="identifier">TN</span><span class="special">,</span>
         <span class="keyword">typename</span> <span class="identifier">U1</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">U2</span><span class="special">,</span> <span class="special">...,</span> <span class="keyword">typename</span> <span class="identifier">UN</span><span class="special">&gt;</span>
<span class="keyword">bool</span> <span class="keyword">operator</span><span class="special">&lt;(</span>
    <span class="keyword">const</span> <span class="identifier">tuple</span><span class="special">&lt;</span><span class="identifier">T1</span><span class="special">,</span> <span class="identifier">T2</span><span class="special">,</span> <span class="special">...,</span> <span class="identifier">TN</span><span class="special">&gt;&amp;</span> <span class="identifier">lhs</span><span class="special">,</span>
    <span class="keyword">const</span> <span class="identifier">tuple</span><span class="special">&lt;</span><span class="identifier">U1</span><span class="special">,</span> <span class="identifier">U2</span><span class="special">,</span> <span class="special">...,</span> <span class="identifier">UN</span><span class="special">&gt;&amp;</span> <span class="identifier">rhs</span><span class="special">);</span>
</pre>
<p>
          <span class="bold"><strong>Requirements</strong></span>: For all <code class="computeroutput"><span class="identifier">i</span></code>,
          <code class="computeroutput"><span class="number">1</span> <span class="special">&lt;=</span>
          <span class="identifier">i</span> <span class="special">&lt;</span>
          <span class="identifier">N</span></code>, <code class="computeroutput"><a class="link" href="element_access.html" title="Element access"><code class="computeroutput"><span class="identifier">get</span></code></a><span class="special">&lt;</span><span class="identifier">i</span><span class="special">&gt;(</span><span class="identifier">lhs</span><span class="special">)</span> <span class="special">&lt;</span> <a class="link" href="element_access.html" title="Element access"><code class="computeroutput"><span class="identifier">get</span></code></a><span class="special">&lt;</span><span class="identifier">i</span><span class="special">&gt;(</span><span class="identifier">rhs</span><span class="special">)</span></code>
          is a valid expression returning a type that is convertible to <code class="computeroutput"><span class="keyword">bool</span></code>.
        </p>
<p>
          <span class="bold"><strong>Semantics</strong></span>: Returns the lexicographical
          comparison of between <code class="computeroutput"><span class="identifier">lhs</span></code>
          and <code class="computeroutput"><span class="identifier">rhs</span></code>.
        </p>
<pre class="programlisting"><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">T1</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">T2</span><span class="special">,</span> <span class="special">...,</span> <span class="keyword">typename</span> <span class="identifier">TN</span><span class="special">,</span>
         <span class="keyword">typename</span> <span class="identifier">U1</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">U2</span><span class="special">,</span> <span class="special">...,</span> <span class="keyword">typename</span> <span class="identifier">UN</span><span class="special">&gt;</span>
<span class="keyword">bool</span> <span class="keyword">operator</span><span class="special">!=(</span>
    <span class="keyword">const</span> <span class="identifier">tuple</span><span class="special">&lt;</span><span class="identifier">T1</span><span class="special">,</span> <span class="identifier">T2</span><span class="special">,</span> <span class="special">...,</span> <span class="identifier">TN</span><span class="special">&gt;&amp;</span> <span class="identifier">lhs</span><span class="special">,</span>
    <span class="keyword">const</span> <span class="identifier">tuple</span><span class="special">&lt;</span><span class="identifier">U1</span><span class="special">,</span> <span class="identifier">U2</span><span class="special">,</span> <span class="special">...,</span> <span class="identifier">UN</span><span class="special">&gt;&amp;</span> <span class="identifier">rhs</span><span class="special">);</span>
</pre>
<p>
          <span class="bold"><strong>Requirements</strong></span>: For all <code class="computeroutput"><span class="identifier">i</span></code>,
          <code class="computeroutput"><span class="number">1</span> <span class="special">&lt;=</span>
          <span class="identifier">i</span> <span class="special">&lt;</span>
          <span class="identifier">N</span></code>, <code class="computeroutput"><a class="link" href="element_access.html" title="Element access"><code class="computeroutput"><span class="identifier">get</span></code></a><span class="special">&lt;</span><span class="identifier">i</span><span class="special">&gt;(</span><span class="identifier">lhs</span><span class="special">)</span> <span class="special">==</span> <a class="link" href="element_access.html" title="Element access"><code class="computeroutput"><span class="identifier">get</span></code></a><span class="special">&lt;</span><span class="identifier">i</span><span class="special">&gt;(</span><span class="identifier">rhs</span><span class="special">)</span></code>
          is a valid expression returning a type that is convertible to <code class="computeroutput"><span class="keyword">bool</span></code>.
        </p>
<p>
          <span class="bold"><strong>Semantics</strong></span>: Returns <code class="computeroutput"><span class="special">!(</span><span class="identifier">lhs</span> <span class="special">==</span> <span class="identifier">rhs</span><span class="special">)</span></code>.
        </p>
<pre class="programlisting"><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">T1</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">T2</span><span class="special">,</span> <span class="special">...,</span> <span class="keyword">typename</span> <span class="identifier">TN</span><span class="special">,</span>
         <span class="keyword">typename</span> <span class="identifier">U1</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">U2</span><span class="special">,</span> <span class="special">...,</span> <span class="keyword">typename</span> <span class="identifier">UN</span><span class="special">&gt;</span>
<span class="keyword">bool</span> <span class="keyword">operator</span><span class="special">&lt;=(</span>
    <span class="keyword">const</span> <span class="identifier">tuple</span><span class="special">&lt;</span><span class="identifier">T1</span><span class="special">,</span> <span class="identifier">T2</span><span class="special">,</span> <span class="special">...,</span> <span class="identifier">TN</span><span class="special">&gt;&amp;</span> <span class="identifier">lhs</span><span class="special">,</span>
    <span class="keyword">const</span> <span class="identifier">tuple</span><span class="special">&lt;</span><span class="identifier">U1</span><span class="special">,</span> <span class="identifier">U2</span><span class="special">,</span> <span class="special">...,</span> <span class="identifier">UN</span><span class="special">&gt;&amp;</span> <span class="identifier">rhs</span><span class="special">);</span>
</pre>
<p>
          <span class="bold"><strong>Requirements</strong></span>: For all <code class="computeroutput"><span class="identifier">i</span></code>,
          <code class="computeroutput"><span class="number">1</span> <span class="special">&lt;=</span>
          <span class="identifier">i</span> <span class="special">&lt;</span>
          <span class="identifier">N</span></code>, <code class="computeroutput"><a class="link" href="element_access.html" title="Element access"><code class="computeroutput"><span class="identifier">get</span></code></a><span class="special">&lt;</span><span class="identifier">i</span><span class="special">&gt;(</span><span class="identifier">rhs</span><span class="special">)</span> <span class="special">&lt;</span> <a class="link" href="element_access.html" title="Element access"><code class="computeroutput"><span class="identifier">get</span></code></a><span class="special">&lt;</span><span class="identifier">i</span><span class="special">&gt;(</span><span class="identifier">lhs</span><span class="special">)</span></code>
          is a valid expression returning a type that is convertible to <code class="computeroutput"><span class="keyword">bool</span></code>.
        </p>
<p>
          <span class="bold"><strong>Semantics</strong></span>: Returns <code class="computeroutput"><span class="special">!(</span><span class="identifier">rhs</span> <span class="special">&lt;</span> <span class="identifier">lhs</span><span class="special">)</span></code>
        </p>
<pre class="programlisting"><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">T1</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">T2</span><span class="special">,</span> <span class="special">...,</span> <span class="keyword">typename</span> <span class="identifier">TN</span><span class="special">,</span>
         <span class="keyword">typename</span> <span class="identifier">U1</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">U2</span><span class="special">,</span> <span class="special">...,</span> <span class="keyword">typename</span> <span class="identifier">UN</span><span class="special">&gt;</span>
<span class="keyword">bool</span> <span class="keyword">operator</span><span class="special">&gt;(</span>
    <span class="keyword">const</span> <span class="identifier">tuple</span><span class="special">&lt;</span><span class="identifier">T1</span><span class="special">,</span> <span class="identifier">T2</span><span class="special">,</span> <span class="special">...,</span> <span class="identifier">TN</span><span class="special">&gt;&amp;</span> <span class="identifier">lhs</span><span class="special">,</span>
    <span class="keyword">const</span> <span class="identifier">tuple</span><span class="special">&lt;</span><span class="identifier">U1</span><span class="special">,</span> <span class="identifier">U2</span><span class="special">,</span> <span class="special">...,</span> <span class="identifier">UN</span><span class="special">&gt;&amp;</span> <span class="identifier">rhs</span><span class="special">);</span>
</pre>
<p>
          <span class="bold"><strong>Requirements</strong></span>: For all <code class="computeroutput"><span class="identifier">i</span></code>,
          <code class="computeroutput"><span class="number">1</span> <span class="special">&lt;=</span>
          <span class="identifier">i</span> <span class="special">&lt;</span>
          <span class="identifier">N</span></code>, <code class="computeroutput"><a class="link" href="element_access.html" title="Element access"><code class="computeroutput"><span class="identifier">get</span></code></a><span class="special">&lt;</span><span class="identifier">i</span><span class="special">&gt;(</span><span class="identifier">rhs</span><span class="special">)</span> <span class="special">&lt;</span> <a class="link" href="element_access.html" title="Element access"><code class="computeroutput"><span class="identifier">get</span></code></a><span class="special">&lt;</span><span class="identifier">i</span><span class="special">&gt;(</span><span class="identifier">lhs</span><span class="special">)</span></code>
          is a valid expression returning a type that is convertible to <code class="computeroutput"><span class="keyword">bool</span></code>.
        </p>
<p>
          <span class="bold"><strong>Semantics</strong></span>: Returns <code class="computeroutput"><span class="identifier">rhs</span>
          <span class="special">&lt;</span> <span class="identifier">lhs</span></code>.
        </p>
<pre class="programlisting"><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">T1</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">T2</span><span class="special">,</span> <span class="special">...,</span> <span class="keyword">typename</span> <span class="identifier">TN</span><span class="special">,</span>
         <span class="keyword">typename</span> <span class="identifier">U1</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">U2</span><span class="special">,</span> <span class="special">...,</span> <span class="keyword">typename</span> <span class="identifier">UN</span><span class="special">&gt;</span>
<span class="keyword">bool</span> <span class="keyword">operator</span><span class="special">&gt;=(</span>
    <span class="keyword">const</span> <span class="identifier">tuple</span><span class="special">&lt;</span><span class="identifier">T1</span><span class="special">,</span> <span class="identifier">T2</span><span class="special">,</span> <span class="special">...,</span> <span class="identifier">TN</span><span class="special">&gt;&amp;</span> <span class="identifier">lhs</span><span class="special">,</span>
    <span class="keyword">const</span> <span class="identifier">tuple</span><span class="special">&lt;</span><span class="identifier">U1</span><span class="special">,</span> <span class="identifier">U2</span><span class="special">,</span> <span class="special">...,</span> <span class="identifier">UN</span><span class="special">&gt;&amp;</span> <span class="identifier">rhs</span><span class="special">);</span>
</pre>
<p>
          <span class="bold"><strong>Requirements</strong></span>: For all <code class="computeroutput"><span class="identifier">i</span></code>,
          <code class="computeroutput"><span class="number">1</span> <span class="special">&lt;=</span>
          <span class="identifier">i</span> <span class="special">&lt;</span>
          <span class="identifier">N</span></code>, <code class="computeroutput"><a class="link" href="element_access.html" title="Element access"><code class="computeroutput"><span class="identifier">get</span></code></a><span class="special">&lt;</span><span class="identifier">i</span><span class="special">&gt;(</span><span class="identifier">lhs</span><span class="special">)</span> <span class="special">&lt;</span> <a class="link" href="element_access.html" title="Element access"><code class="computeroutput"><span class="identifier">get</span></code></a><span class="special">&lt;</span><span class="identifier">i</span><span class="special">&gt;(</span><span class="identifier">rhs</span><span class="special">)</span></code>
          is a valid expression returning a type that is convertible to <code class="computeroutput"><span class="keyword">bool</span></code>.
        </p>
<p>
          <span class="bold"><strong>Semantics</strong></span>: Returns <code class="computeroutput"><span class="special">!(</span><span class="identifier">lhs</span> <span class="special">&lt;</span> <span class="identifier">rhs</span><span class="special">)</span></code>.
        </p>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman,
      Dan Marsden, Tobias Schwinger<p>
        Distributed under the Boost Software License, Version 1.0. (See accompanying
        file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
      </p>
</div></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="element_access.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../class_template_tuple.html"><img src="../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="../pairs.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
</body>
</html>
